#ifndef AVALON_CONNECTIONSTATE_HPP
#define AVALON_CONNECTIONSTATE_HPP
#include "Avalon/IO/IO.hpp"

namespace Avalon {
namespace IO {

  /*! \class ConnectionState
   *  \brief Manages generic state information about a Connection.
   */
  class ConnectionState {
    public:

      //! Constructs a ConnectionState.
      ConnectionState();

      ~ConnectionState();

      //! Initializes the state.
      /*!
        \param isOpen Whether the connection state is open.
      */
      void Initialize(bool isOpen);

      //! Returns <code>true</code> iff the state is open.
      bool IsOpen() const;

      //! Sets the state to closed.
      void SetClosed();

    private:
      bool m_isOpen;
  };
}
}

#endif // AVALON_CONNECTIONSTATE_HPP
